package org.example.model.Singleton;

import java.util.Random;

public class NavigationSystem {
    private static NavigationSystem instance;
    private Random random = new Random();

    private NavigationSystem() {
        System.out.println("初始化高精度定位导航系统");
    }

    public static synchronized NavigationSystem getInstance() {
        if (instance == null) {
            instance = new NavigationSystem();
        }
        return instance;

    }



    public String getPosition() {
        return "X:" + (random.nextInt(100) + 1) + " Y:" + (random.nextInt(100) + 1);
    }

}
